package item.config;


import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import item.interceptor.LoginInterceptor;


@Configuration
public class WebConfig implements WebMvcConfigurer{
	public static final String STATIC_PATH="/img/";
	public static final String STATIC_DIR="D:\\uploadfile\\";
	@Autowired
	LoginInterceptor loginInt;
		
public void addResourceHandlers(ResourceHandlerRegistry registry) {
	registry.addResourceHandler(STATIC_PATH+"**").addResourceLocations("file:"+STATIC_DIR);
}
//	public void addInterceptors(InterceptorRegistry registry) {
//		// TODO Auto-generated method stub
//		registry.addInterceptor(loginInt).addPathPatterns("/**").excludePathPatterns("/dologin");
//	}
}
